summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2022-11-20 23:10:25 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2022-11-29 01:22:18 +0100
commit4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5 (patch)
tree08a404fbfbdc9b5bcc3a8f19dc7db14a2053816a
parentconfig: Custom profile detection fixes (diff)
downloadyuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.tar
yuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.tar.gz
yuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.tar.bz2
yuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.tar.lz
yuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.tar.xz
yuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.tar.zst
yuzu-4cbbf590e3e811fac4b2605e148cd1b7f1ae2eb5.zip
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 9e5a40fe7..ed21f4b92 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -1553,6 +1553,7 @@ void ConfigureInputPlayer::LoadProfile() {
}
void ConfigureInputPlayer::SaveProfile() {
+ static constexpr size_t HANDHELD_INDEX = 8;
const QString profile_name = ui->comboProfiles->itemText(ui->comboProfiles->currentIndex());
if (profile_name.isEmpty()) {
@@ -1561,7 +1562,12 @@ void ConfigureInputPlayer::SaveProfile() {
ApplyConfiguration();
- if (!profiles->SaveProfile(profile_name.toStdString(), player_index)) {
+ // When we're in handheld mode, only the handheld emulated controller bindings are updated
+ const bool is_handheld = player_index == 0 && emulated_controller->GetNpadIdType() ==
+ Core::HID::NpadIdType::Handheld;
+ const auto profile_player_index = is_handheld ? HANDHELD_INDEX : player_index;
+
+ if (!profiles->SaveProfile(profile_name.toStdString(), profile_player_index)) {
QMessageBox::critical(this, tr("Save Input Profile"),
tr("Failed to save the input profile \"%1\"").arg(profile_name));
UpdateInputProfiles();